package com.hyh.shiyanshiguanli.controller;

import com.hyh.shiyanshiguanli.domain.dto.LibDTO;
import com.hyh.shiyanshiguanli.domain.dto.MessageDTO;
import com.hyh.shiyanshiguanli.domain.dto.PageDTO;
import com.hyh.shiyanshiguanli.domain.result.PageResult;
import com.hyh.shiyanshiguanli.domain.result.Result;
import com.hyh.shiyanshiguanli.domain.vo.LibVO;
import com.hyh.shiyanshiguanli.service.LibAssetService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hyh
 * @version 1.0
 */
@Slf4j
@RestController
@RequestMapping("/libAsset")
public class libAssetController {

    @Autowired
    LibAssetService libAssetService;

    @GetMapping("/page")
    public Result<PageResult> page(PageDTO pageDTO){
        log.info("实验室仪器资源查询{}",pageDTO);

        PageResult result = libAssetService.pageInstrument(pageDTO);

        return Result.success(result);
    }

    @GetMapping("/pageShiJi")
    public Result<PageResult> pageShiJi(PageDTO pageDTO){
        log.info("实验室试剂资源查询{}",pageDTO);

        PageResult result = libAssetService.pageShiJi(pageDTO);

        return Result.success(result);
    }

}
